home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
serien
/
purity
/
nr.10
/
demo
/
sparx.i
/
.spark05.i
< prev
next >
Wrap
Text File
|
1995-04-19
|
1KB
|
68 lines
Procedure Spark05;
Const
max4lines = 80;
Type
Sp1lines = Array[1..max4lines] of line;
Sp1LinesPtr = ^Sp1Lines;
Var
arr : Sp1LinesPtr;
cnt1,
cnt2,
cnt3,
cnt4,
CCNT,
add1,
add2,
add3,
add4,
actualline : Short;
Begin
New(arr);
ActualLine := 1;
cnt1 := 246; add1 := 3; { x1 }
cnt2 := 3; add2 := 7; { y1 }
cnt3 := 187; add3 := 3; { x2 }
cnt4 := 428; add4 := 11; { y2 }
CCNT := 1; { color }
Repeat
EraseLine( Adr(arr^[actualline]) );
With arr^[actualline] do begin
x1 := 160 + XSin^[cnt1] * 4 DIV 5; { +- max. 80 }
y1 := 120 + Xcos^[cnt2] * 3 DIV 5; { +- max. 60 }
x2 := 160 + XSin^[cnt3] * 8 DIV 5; { +- max.160 }
y2 := 120 + Xcos^[cnt4] * 6 DIV 5; { +- max.120 }
end;
cnt1 := cnt1 + add1;
if cnt1>627 then cnt1:= cnt1-628;
cnt2 := cnt2 + add2;
if cnt2>627 then cnt2:= cnt2-628;
cnt3 := cnt3 + add3;
if cnt3>627 then cnt3:= cnt3-628;
cnt4 := cnt4 + add4;
if cnt4>627 then cnt4:= cnt4-628;
DrawLine( Adr(arr^[actualline]), CCNT );
inc( CCNT );
If CCNT > maxColors then CCNT := 2;
inc( actualline );
If actualline >= max4lines then actualline := 1;
Until LeftMouseButton;
Ciao;
Dispose(arr);
SetSColors( Adr(Def_Colors) );
End;